﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Runda.CMS.Common.Application.Components.dll" Inherits="Runda.CMS.Web.Controls.Lookup.LookupSinglePage" %>

<%@ Import Namespace="Runda.CMS.Web.Controls.Lookup" %>
<html>
<head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="../Content/Form/form.css" />
    <link rel="stylesheet" type="text/css" href="../Content/Dialog/Dialogs.css" />

    <script type="text/javascript" src="../Content/Form/addrelated.js"></script>

    <script type="text/javascript" src="../Content/util.js"></script>

    <link rel="stylesheet" type="text/css" href="../Content/Form/select.css" />
    <link rel="stylesheet" type="text/css" href="../Content/global.css" />   
    <script type="text/javascript" src="../Content/global.js"></script>

    <title>查找记录</title>
    <link rel="stylesheet" type="text/css" href="../Content/Menu/Menu.css" />
    <link rel="stylesheet" type="text/css" href="../Content/lookup/lookupdialogs.css" />

    <script type="text/javascript" src="../Content/lookup/map_LookupDialogs.js"></script>

    <script language="javascript" type="text/javascript">
<%
		RenderCreatePrivileges();
%>	
		_mode = <%=(int)Mode%>;
	
		function applychanges()
		{
			selectItem();
		}
		
		function cancel()
		{
			window.close();
		}
		
		function window.onload()
		{ 
			if ( !checkMode( _mode, LookupBrowse ) )
			{
				findValue.focus();
			}
			else
			{
				frmResults.focus();	
			}
		}
	
		function resultsReady()
		{
			if ( frmResults.document.readyState == "complete" )
			{
				document.body.style.cursor = "auto";

				if ( !checkMode( _mode, LookupBrowse ) )
				{
					btnGo.disabled = false;
				}
				
				setNavigationState();
			}
		}

		function selectItem()
		{
			if (frmResults.tblResults != undefined)
			{
				if( frmResults.tblResults.selectedItems )
				{
					window.returnValue = buildReturnValue( frmResults.tblResults.selectedItems );
					window.close();
				}
			}
			else
			{
				window.close();
			}
		}
		
		function appendSelected()
		{
			selectItem();
		}
		
		function setNavigationState()
		{
		}
	
    </script>

</head>
<body>
    <table style="width: 100%; height: 100%;" cellspacing="0" cellpadding="0">
        <tr>
            <td colspan="2" class="header">
                <div class="header">
                    查找记录</div>
                <div class="headerdesc">
                    <% ShowDescription();%></div>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="height: 100%;">
                <div class="main">
                    <div id="divWarning">
                        <table cellspacing="0" cellpadding="0" width="100%" height="100%">
                            <tr>
                                <td class="search">
                                    <% RenderSearchHeader(); %>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <table height="100%" width="100%" id="tblFind" cellpadding="0" cellspacing="0">
                                        <col width="30">
                                        <tr height="20">
                                            <td>
                                                可用记录:
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3" style="padding-top: 5px">
                                                <% RenderResultsFrame(); %>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div id='divFillBg' style='display: none; position: absolute; top: 80px; left: 20px;
                    height: 23px; width: 355px; background-color: #ffffff;'>
                    &nbsp;
                </div>
                <div id='divFill' style='display: none; position: absolute; top: 80px; left: 20px;
                    height: 23px; width: 0px; filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#00ff00, EndColorStr=#00cc00);'>
                    &nbsp;
                </div>
                <div id='divStatus' style='display: none; position: absolute; top: 80px; left: 19px;
                    height: 23px; width: 357px;'>
                    <img src='/Images/statusbar.gif' height='23' width='357' />
                </div>
            </td>
        </tr>
        <tr>
            <td class="footer">
                &nbsp;
            </td>
            <td align="right" class="footer">
                <button id="butBegin" onclick="applychanges();">
                    确定</button>&nbsp;
                <button id="cmdDialogCancel" onclick="cancel();">
                        取消</button>
            </td>
        </tr>
    </table>
</body>
</html>